﻿@using Webdiyer.WebControls.Mvc
@model Codingwell.DevText.Model.ViewModel.NewsOfCategory
		   
@{
	if (!string.IsNullOrEmpty(Request.QueryString["page"])) {
		ViewBag.Title = Model.Category.Name + " - 第" + Request.QueryString["page"] + "页";
	} else {
		ViewBag.Title = Model.Category.Name;
	}
	Layout = "~/Views/Shared/_Layout.cshtml";
}
@section LocationPath{
	<a class="title" href="/" >Devtext.com</a> » <a href="/news">业内资讯</a> » @Model.Category.Name
}
<div class="fl l2_left">
	<ul class="l2_list">
		@foreach (var article in Model.News) {
			<li>
				@if (!string.IsNullOrEmpty(@article.Path)) { 
				<h2><a href="/news/detail/@article.ID/@article.Path" target="_blank" class="color_blue">@article.Title</a></h2>
	   }else{
	   <h2><a href="/news/detail/@article.ID" target="_blank" class="color_blue">@article.Title</a></h2>
   }
					@{if (article.TopicID.HasValue) {
				<div class="fr news_list_pic">
					<a href="/news/topic/@article.TopicID">
						<img src="@article.NewsTopic.FilePath" alt="@article.NewsTopic.Name" /></a></div>
	   }
  }
				<div class="l2_list_text">
					<p>@Html.Raw(article.Summary)</p>
					<p class="send_info">
						<a href="/user/@article.CreatorID/" class="color_blue">@article.User.NickName</a><span>发表于 @article.CreateTime.ToString("yyyy-MM-dd HH:mm:ss")</span><span class="read">@article.PageViewCount
							次浏览</span><span class="tag">
								@foreach (Codingwell.DevText.Model.Entities.NewsCategory cate in article.NewsCategories) {
									<a href="/news/category/@cate.ID"  class="web_col_icon color_blue" >@cate.Name</a>
		}
							</span></p>
				</div>
				<div class="clearfix">
				</div>
			</li>
  }
	</ul>
	<div class="depage">@Html.Pager(Model.News, new PagerOptions { PageIndexParameterName = "page", CssClass = BarStyle.flickr.ToString(), NumericPagerItemCount = 7 })</div>
</div>
<div class="fr l2_right">
	@{Html.RenderAction("NewsSilde", "News");}
</div>
<div class="clearfix"></div>